home *** CD-ROM | disk | FTP | other *** search
/ Sound Fx / Sound Fx.iso / Software / UNZIPED / MPW181-5 / _SETUP.1 / NeXT_obuffer.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-04-21  |  2.1 KB  |  69 lines

  1. /* NeXT_obuffer.h
  2.  
  3.    Header file for NeXT output buffer. Copied from maplay 1.3b. */
  4.  
  5. /*
  6.  *  @(#) obuffer_next.h 1.1, last edit: 27 Oct 1994 17:20:55
  7.  *  @(#) Copyright (C) 1993, 1994 Tobias Bading (bading@cs.tu-berlin.de)
  8.  *  @(#) Berlin University of Technology
  9.  *
  10.  *  NeXTStep class written at the end of June 1994 by
  11.  *  Pete French (pete@ohm.york.ac.uk) and Ian Stepehnson (ian@ohm.york.ac.uk)
  12.  *
  13.  *  This program is free software; you can redistribute it and/or modify
  14.  *  it under the terms of the GNU General Public License as published by
  15.  *  the Free Software Foundation; either version 2 of the License, or
  16.  *  (at your option) any later version.
  17.  *
  18.  *  This program is distributed in the hope that it will be useful,
  19.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  20.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  21.  *  GNU General Public License for more details.
  22.  *
  23.  *  You should have received a copy of the GNU General Public License
  24.  *  along with this program; if not, write to the Free Software
  25.  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  26.  */
  27.  
  28. #ifndef NEXT_OBUFFER_H
  29. #define NEXT_OBUFFER_H
  30.  
  31. #ifdef NeXT
  32.  
  33. #include "args.h"
  34. #include "obuffer.h"
  35.  
  36. const uint32 OBUFFERSIZE = 100000;      // Loads of buffering
  37. #define MAX_QUEUE_LENGTH 10             // but never more than this
  38. #define CAN_QUEUE 0
  39. #define CANNOT_QUEUE 1
  40. const uint32 MAXCHANNELS = 2;           // max. number of channels
  41.  
  42. class NeXTObuffer : public Obuffer
  43. {
  44.   int16  buffer[OBUFFERSIZE];
  45.   int16 *bufferp[MAXCHANNELS];
  46.   static float sample_rate;
  47.   static int chans;
  48.   static void really_write_buffer(int16 **, int16 *);
  49.  
  50. public:
  51.         NeXTObuffer (uint32 number_of_channels, MPEG_Args *maplay_args);
  52.        ~NeXTObuffer (void);
  53.   void  append (uint32 channel, int16 value);
  54.   void  write_buffer (int dummy) {}     // not needed
  55.  
  56. #ifdef SEEK_STOP
  57.   void NeXTObuffer::clear_buffer(void);
  58.  
  59.   void NeXTObuffer::set_stop_flag(void)
  60. #endif // SEEK_STOP
  61.  
  62.   static BOOL class_suitable (uint32 number_of_channels);
  63. };
  64.  
  65. #endif // NeXT
  66.  
  67. #endif // NEXT_OBUFFER_H
  68.  
  69.